﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp2
{
    class StringUtil
    {
        public static void Text()
        {
            Console.WriteLine("请输入一段字符");
            string str1 = Console.ReadLine();
            bool index = false; 
            if (str1 == null || str1 == String.Empty || str1 =="" ||string.IsNullOrWhiteSpace(str1))
            {
                index = true;
            }
            Console.WriteLine(index);
        }
    }
    class ArrayUtil
    {
        public static void Text()
        {
            bool index = false;
            string[] arr = new string[5];
            for (int i = 0; i < arr.Length; i++)
            {
                Console.WriteLine("请为数组添加值");
                arr[i] = Console.ReadLine();
            }
            for (int i = 0; i < arr.Length; i++)
            {
                if (arr[i] == "" || arr[i] ==null || string.IsNullOrWhiteSpace(arr[i]))
                {
                    index = true;
                }
            }
        }
    }
}
